package algos;

public class Functions {

    private Functions() {}

    private static class Constant<Arg, Value> implements Function<Arg, Value> {
        private final Value value;

        private Constant(Value v) {
            value = v;
        }

        public Value f(Arg x) {
            return value;
        }
    }

    public static <Args, Value> Function<Args, Value> constantFunction(Value value){
        return new Constant<Args,Value>(value);
    }

}
